﻿package model 
{	
	import com.adobe.crypto.MD5;
	
	/**
	 * ...
	 * @author Slavshik Alexander
	 */
	public class Photo 
	{
		public var pid:int = -1;
		public var aid:int = -1;
		public var owner_id:int = -1;
		public var src:String
		public var src_big:String;
		public var src_small:String;
		public var created:int = -1;
		public var rating:int = -1;

		private var _serverId/*id фотографии на нашем сервере*/:String;

		public function toString():String {
			return "[Photo " + pid + " " + src + " ]"
		}
		
		public function get serverId():String{
			_serverId =  MD5.hash(String(pid)+String(aid));
			return _serverId;
		}
		
	}
	
}